Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1.4K
Visualizações
error An unexpected error occurred: "Commit hash required"

when I using this command to add eslint(@vue/cli 4.5.15):

vue add eslint

shows error like this:

 WARN  There are uncommitted changes in the current repository, it's recommended to commit or stash them first.
? Still proceed? Yes

📦  Installing @vue/cli-plugin-eslint...

yarn add v1.22.17
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
info If you think this is a bug, please open a bug report with the information provided in "/Users/xiaoqiangjiang/source/reddwarf/frontend/crx-selection-translate/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
error An unexpected error occurred: "Commit hash required".
 ERROR  command failed: yarn add @vue/cli-plugin-eslint@~4.5.0 -D

what should I do to fix this problem? I already have tried to remove the lock file but still did not fix this problem. the node version is v16.13.2.

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

This usually happens when a you use npm install on a yarn project, then yarn install when you realize npm didn't work. Somehow yarn.lock gets corrupted. Here is what I do:

rm package-lock.json
rm yarn.lock
git checkout <old-hash> yarn.lock
about 4 years ago · Juan Pablo Isaza Relatório

0

For me I did the following and it works:

$ rm package-lock.json    # remove the package-lock.json file

$ yarn install  # install successfully and update the yarn.lock file
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda